home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls085.solintel.Z / tls085.solintel / lib / vtcl / tests / info.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  1.0 KB  |  49 lines

  1. # CVS $Id: info.tcl,v 1.3 1995/02/03 16:54:51 zibi Exp $
  2. #
  3. # Simple test of the VtInfo command
  4. #
  5. proc okCB {cbs} {
  6.     set dlog [keylget cbs dialog]
  7.  
  8.     set charm [VtInfo -charm]
  9.     set version [VtInfo -version]
  10.     set colors [VtInfo -colors]
  11.     set height [VtInfo -displayHeight]
  12.     set width [VtInfo -displayWidth]
  13.  
  14.     set msg "Charm is $charm\nVersion is $version\nNumber of Colors: $colors
  15. Dimension: $width X $height"
  16.  
  17.     set dlog [VtMessageDialog $dlog.mess \
  18.       -message $msg \
  19.       -font medBoldFont -modeless ]
  20.  
  21.     VtShow $dlog
  22. }
  23.  
  24. proc cancelCB {cbs} {
  25.     VtClose
  26. }
  27.  
  28. set ap [VtOpen info]
  29.  
  30. set charm [VtInfo -charm]
  31. set version [VtInfo -version]
  32. set colors [VtInfo -colors]
  33. set height [VtInfo -displayHeight]
  34. set width [VtInfo -displayWidth]
  35.  
  36. set msg "Charm is $charm\nVersion is $version\nNumber of Colors: $colors
  37. Dimension: $width X $height"
  38.  
  39. set dlog [VtMessageDialog $ap.mess \
  40.       -message $msg \
  41.       -okCallback okCB \
  42.       -cancelCallback cancelCB \
  43.       -font medBoldFont -modeless -autoDestroy off -autoHide off ]
  44.  
  45.  
  46. VtShow $dlog
  47.  
  48. VtMainLoop
  49.